package com.bwie.config;

import org.redisson.Redisson;
import org.redisson.api.RedissonClient;
import org.redisson.config.Config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

@Configuration("commonRedisConfig")
public class RedisConfig {

    @Bean(name = "customRedissonClient")
    public RedissonClient redissonClient() {
        Config config = new Config();
        config.useSingleServer().
                setAddress("redis://14.103.151.213:6379");
        return Redisson.create(config);
    }
}
